com.highdeal.hci
Class StringModel

java.lang.Object
  extended by com.highdeal.hci.HCIModelAdapter
      extended by com.highdeal.hci.StringModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMarshallable

public class StringModel
extends HCIModelAdapter

This Java class is a Java String container; It extends the java.lang.String class by adding features to marshal this object type.

See Also:
CurrencyModel, BooleanModel, DateModel, NumberModel

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="string">
  <xs:complexType>
    <xs:attribute name="value" type="xs:string"/>
  </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String TAG_NAME
          The XML tag name of this data model: "string"
 
Constructor Summary
StringModel()
          Constructs a StringModel with a null string.
StringModel(java.lang.String value)
          Constructs a StringModel with a specified String.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String getTagName()
          Gets the XML tag name of the HCI model.
 java.lang.String getValue()
          Gets the string contained by the StringModel.
 void marshalAttributes(XMLOutputter output)
          Gives an XML representation of the attributes of an object.
 void marshalChildren(XMLOutputter output)
          Gives an XML representation of the child objects of an object.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setValue(java.lang.String value)
          Sets the string contained by the StringModel.
 
Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag name of this data model: "string"

See Also:
Constant Field Values
Constructor Detail

StringModel

public StringModel()
Constructs a StringModel with a null string.


StringModel

public StringModel(java.lang.String value)
Constructs a StringModel with a specified String.

Parameters:
value - The string of the StringModel
Method Detail

getValue

public java.lang.String getValue()
Gets the string contained by the StringModel.

Returns:
The string contained by the StringModel

setValue

public void setValue(java.lang.String value)
Sets the string contained by the StringModel.

Parameters:
value - The string contained by the StringModel

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Parameters:
tagName - The name of tag for the child
child - The child to be added

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Parameters:
atts - The XML attributes of the current element

marshalAttributes

public void marshalAttributes(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the attributes of an object.

Parameters:
output - The XML output to marshal the object attributes into

marshalChildren

public void marshalChildren(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the child objects of an object.

Parameters:
output - The XML output to marshal the child objects into

getTagName

public java.lang.String getTagName()
Description copied from interface: ITagNameProvider
Gets the XML tag name of the HCI model.

Returns:
The XML tag name

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)